<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="../../../templates/padrao.xhtml">
	<ui:define name="menu">
		<p:tabMenu style="border:0;" activeIndex="3">
			<p:menuitem url="/view/index1.xhtml" value="Inicio" />
			<p:menuitem url="/view/usuarios/admin/user/listUser.xhtml"
				value="Clientes" />
			<p:menuitem url="/view/usuarios/admin/produto/listProd.xhtml"
				value="Produtos" />
			<p:menuitem url="/view/usuarios/admin/compra/listcompra.xhtml"
				value="Fornecedor" />
			<p:menuitem url="/view/usuarios/admin/compra/listcompra.xhtml"
				value="Vendas" />
			<p:menuitem url="/view/usuarios/admin/compra/listcompra.xhtml"
				value="Compra" />
			<p:menuitem url="/view/usuarios/admin/compra/listcompra.xhtml"
				value="Relatorio" />
		</p:tabMenu>
	</ui:define>
	<ui:define name="conteudo">
		<h:form id="form">
			<h:inputHidden value="#{fornecedorBean.fornecedor.id}" />
			<p:panel header="Cadastro de Fornecedor" id="panel">
				<h:panelGrid id="pn" columns="2" style="margin-bottom:10px"
					styleClass="">
					<f:facet name="header">
						<p:messages />
					</f:facet>

					<h:outputLabel for="nome" value="Nome: *" />
					<p:inputText id="nome" value="#{fornecedorBean.fornecedor.nome}"
						required="true" requiredMessage="Nome é Requerido." />

					<h:outputLabel for="cnpj" value="CNPJ: *" />
					<p:inputText id="cnpj" value="#{fornecedorBean.fornecedor.cnpj}"
						required="true" requiredMessage="CNPJ é Requeiro." />

					<h:outputLabel for="tel" value="TEL: *" />
					<p:inputText id="tel" value="#{fornecedorBean.fornecedor.tel}"
						required="true" requiredMessage="Telefone é Requerido." />


				</h:panelGrid>

			</p:panel>

			<h:panelGrid columns="6" cellpadding="5">
				<p:commandButton value="Enviar" id="btnOk" update="panel"
					action="#{fornecedorBean.salvar}" ajax="false" />

				<p:button value="Listar" id="lista" outcome="listForn" />
			</h:panelGrid>
		</h:form>
	</ui:define>


</ui:composition>
</html>
